package batframework.mvc.render;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import batframework.mvc.ModelMap;
import batframework.mvc.Render;
import batframework.mvc.Session;
import batframework.mvc.web.WebContext;


public abstract class AbstractRender implements Render
{
	protected HttpServletRequest request;
	
	protected HttpServletResponse response;
	
	protected Session session;
	
	protected ServletContext servletContext;
	
	protected ModelMap model;
	
	@Override
	public final void setContext(ModelMap model, WebContext context)
	{
		this.request = context.getRequest();
		this.response = context.getResponse();
		this.servletContext = this.request.getServletContext();
		this.model = model;
	}

}
